package com.dc.ai.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dc.ai.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 学科表
 * </p>
 *
 * @author huge
 * @since 2025-03-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("product_order")
public class Order extends BaseEntity {

    @Schema(description = "主键Id")
    @TableId(type= IdType.AUTO)
    private Integer id;

    @Schema(description = "商品编号")
    private String productNo;

    @Schema(description = "商品类型 0充值会员 1永久会员 2次卡会员")
    private Integer productType;

    @Schema(description = "订单号")
    private String orderId;

    @Schema(description = "用户Id")
    private String userId;

    @Schema(description = "总价")
    private BigDecimal totalPrice;

    @Schema(description = "实际支付")
    private BigDecimal payPrice;

    @Schema(description = "抵扣金额")
    private BigDecimal deductionPrice;

    @Schema(description = "优惠券ID")
    private Long couponId;

    @Schema(description = "设备码")
    private String deviceCode;

    @Schema(description = "优惠券金额")
    private BigDecimal couponPrice;

    @Schema(description = "订单状态（0：待支付 1：已支付  2：已发卡,3. 订单已取消,4.订单关闭）")
    private Integer orderStatus;

    @Schema(description = "返现积分")
    private Integer backIntegral;

    @Schema(description = "备注")
    private String mark;

    @Schema(description = "支付通道 0 微信 1 支付宝,2 IOS ,NULL 未知")
    private Integer payChannel;

    @Schema(description = "0 安卓 1 IOS")
    private Integer clientType;
}
